﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static SimpleWebApi.MyMigration.AdvancedCustomerDbContext;
using static SimpleWebApi.MyMigration.Models.BusinessLicenseManagement.LegalPerson;

namespace SimpleWebApi.MyMigration.Models.BusinessLicenseManagement
{
    public class RelatedPerson : BaseEntity
    {
        [Required]
        [Comment("姓名")]
        [StringLength(50)]
        public string Name { get; set; } // 姓名

        [Comment("民族")]
        [StringLength(20)]
        public string? Ethnicity { get; set; } // 民族

        [Required]
        [Comment("身份证号")]
        [StringLength(18, MinimumLength = 18)]
        public string IdNumber { get; set; } // 身份证号

        
        [Comment("地址")]
        [StringLength(255)]
        public string? Address { get; set; } // 地址

        [Required]
        [Comment("联系电话")]
        [StringLength(20)]
        public string Phone { get; set; } // 联系电话

        [Comment("微信")]
        [StringLength(50)]
        public string? WeChat { get; set; } // 微信

        [Required]
        [Comment("学历")]
        public EducationLevel Education { get; set; } = EducationLevel.不详; // 学历


        // 多对多导航属性
        public ICollection<BusinessLicenseRelatedPerson> BusinessLicenses { get; set; }
    }
}

